Pitfalls and Subtleties of Macros

Contents|Index|Previous|Next
Pitfalls and subtleties of macros

The following documentation discusses some special rules that apply to macros and macro expansion, showing certain cases for which the rules have counter-intuitive consequences needing special care.

- Improperly nested constructs
- Unintended grouping of arithmetic
- Swallowing the semicolon
- Duplication of side effects
- Self-referential macros
- Separate expansion of macro arguments
- Cascaded use of macros
- Newlines in macro arguments

Top|Contents|Index|Previous|Next